/*
 * XML Type:  BankMailSyncRequest
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.BankMailSyncRequest
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML BankMailSyncRequest(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class BankMailSyncRequestImpl extends net.ofx.types.x2003.x04.impl.AbstractSyncRequestImpl implements net.ofx.types.x2003.x04.BankMailSyncRequest
{
    
    public BankMailSyncRequestImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName INCIMAGES$0 = 
        new javax.xml.namespace.QName("", "INCIMAGES");
    private static final javax.xml.namespace.QName USEHTML$2 = 
        new javax.xml.namespace.QName("", "USEHTML");
    private static final javax.xml.namespace.QName BANKACCTFROM$4 = 
        new javax.xml.namespace.QName("", "BANKACCTFROM");
    private static final javax.xml.namespace.QName CCACCTFROM$6 = 
        new javax.xml.namespace.QName("", "CCACCTFROM");
    private static final javax.xml.namespace.QName BANKMAILTRNRQ$8 = 
        new javax.xml.namespace.QName("", "BANKMAILTRNRQ");
    
    
    /**
     * Gets the "INCIMAGES" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getINCIMAGES()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INCIMAGES$0, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "INCIMAGES" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetINCIMAGES()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(INCIMAGES$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "INCIMAGES" element
     */
    public void setINCIMAGES(net.ofx.types.x2003.x04.BooleanType.Enum incimages)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INCIMAGES$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INCIMAGES$0);
            }
            target.setEnumValue(incimages);
        }
    }
    
    /**
     * Sets (as xml) the "INCIMAGES" element
     */
    public void xsetINCIMAGES(net.ofx.types.x2003.x04.BooleanType incimages)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(INCIMAGES$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(INCIMAGES$0);
            }
            target.set(incimages);
        }
    }
    
    /**
     * Gets the "USEHTML" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getUSEHTML()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USEHTML$2, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "USEHTML" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetUSEHTML()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(USEHTML$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "USEHTML" element
     */
    public void setUSEHTML(net.ofx.types.x2003.x04.BooleanType.Enum usehtml)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USEHTML$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(USEHTML$2);
            }
            target.setEnumValue(usehtml);
        }
    }
    
    /**
     * Sets (as xml) the "USEHTML" element
     */
    public void xsetUSEHTML(net.ofx.types.x2003.x04.BooleanType usehtml)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(USEHTML$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(USEHTML$2);
            }
            target.set(usehtml);
        }
    }
    
    /**
     * Gets the "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount getBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "BANKACCTFROM" element
     */
    public boolean isSetBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BANKACCTFROM$4) != 0;
        }
    }
    
    /**
     * Sets the "BANKACCTFROM" element
     */
    public void setBANKACCTFROM(net.ofx.types.x2003.x04.BankAccount bankacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$4);
            }
            target.set(bankacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount addNewBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$4);
            return target;
        }
    }
    
    /**
     * Unsets the "BANKACCTFROM" element
     */
    public void unsetBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BANKACCTFROM$4, 0);
        }
    }
    
    /**
     * Gets the "CCACCTFROM" element
     */
    public net.ofx.types.x2003.x04.CreditCardAccount getCCACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccount target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().find_element_user(CCACCTFROM$6, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "CCACCTFROM" element
     */
    public boolean isSetCCACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CCACCTFROM$6) != 0;
        }
    }
    
    /**
     * Sets the "CCACCTFROM" element
     */
    public void setCCACCTFROM(net.ofx.types.x2003.x04.CreditCardAccount ccacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccount target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().find_element_user(CCACCTFROM$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().add_element_user(CCACCTFROM$6);
            }
            target.set(ccacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "CCACCTFROM" element
     */
    public net.ofx.types.x2003.x04.CreditCardAccount addNewCCACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccount target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().add_element_user(CCACCTFROM$6);
            return target;
        }
    }
    
    /**
     * Unsets the "CCACCTFROM" element
     */
    public void unsetCCACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CCACCTFROM$6, 0);
        }
    }
    
    /**
     * Gets array of all "BANKMAILTRNRQ" elements
     */
    public net.ofx.types.x2003.x04.BankMailTransactionRequest[] getBANKMAILTRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(BANKMAILTRNRQ$8, targetList);
            net.ofx.types.x2003.x04.BankMailTransactionRequest[] result = new net.ofx.types.x2003.x04.BankMailTransactionRequest[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "BANKMAILTRNRQ" element
     */
    public net.ofx.types.x2003.x04.BankMailTransactionRequest getBANKMAILTRNRQArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankMailTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.BankMailTransactionRequest)get_store().find_element_user(BANKMAILTRNRQ$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "BANKMAILTRNRQ" element
     */
    public int sizeOfBANKMAILTRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BANKMAILTRNRQ$8);
        }
    }
    
    /**
     * Sets array of all "BANKMAILTRNRQ" element
     */
    public void setBANKMAILTRNRQArray(net.ofx.types.x2003.x04.BankMailTransactionRequest[] bankmailtrnrqArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(bankmailtrnrqArray, BANKMAILTRNRQ$8);
        }
    }
    
    /**
     * Sets ith "BANKMAILTRNRQ" element
     */
    public void setBANKMAILTRNRQArray(int i, net.ofx.types.x2003.x04.BankMailTransactionRequest bankmailtrnrq)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankMailTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.BankMailTransactionRequest)get_store().find_element_user(BANKMAILTRNRQ$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(bankmailtrnrq);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "BANKMAILTRNRQ" element
     */
    public net.ofx.types.x2003.x04.BankMailTransactionRequest insertNewBANKMAILTRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankMailTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.BankMailTransactionRequest)get_store().insert_element_user(BANKMAILTRNRQ$8, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "BANKMAILTRNRQ" element
     */
    public net.ofx.types.x2003.x04.BankMailTransactionRequest addNewBANKMAILTRNRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankMailTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.BankMailTransactionRequest)get_store().add_element_user(BANKMAILTRNRQ$8);
            return target;
        }
    }
    
    /**
     * Removes the ith "BANKMAILTRNRQ" element
     */
    public void removeBANKMAILTRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BANKMAILTRNRQ$8, i);
        }
    }
}
